﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using MingYuanYun.Context.Abstractions;
using System;

namespace MingYuanYun.Context
{
    public class ServiceContext : IServiceContext
    {
        public ServiceContext(
            IConfiguration configuration,
            IServiceScopeFactory serviceScope,
            IServiceProvider serviceProvider)
        {
            this.Configuration = configuration;
            this.ServiceScopeFactory = serviceScope;
            this.ServiceProvider = serviceProvider;
        }

        public IConfiguration Configuration { get; }

        public IServiceScopeFactory ServiceScopeFactory { get; }

        public IServiceProvider ServiceProvider { get; }
    }
}
